#pragma once

class RectBase
{
public:
	RectBase();
	virtual ~RectBase();

public:	
	virtual void		Update() = 0;
	virtual void		ChangeSize() = 0;

	void				SetPos(int nPosX, int nPosY);
	void				SetSize(int nWidth, int nHeight);
	void				SetPosSize(int nPosX, int nPosY, int nWidth, int nHeight);	
	void				SetTexPos(float fL, float fR, float fT, float fB);
	BOOL				PtInRect(int nPosX, int nPosY);
	void				SetShow(BOOL bShow)						{ m_bShow = bShow; }

	int					GetPosX()								{ return m_nPosX; }
	int					GetPosY()								{ return m_nPosY; }
	int					GetWidth()								{ return m_nWidth; }
	int					GetHeight()								{ return m_nHeight; }
	float				GetTexLeft()							{ return m_fTexLeft; }
	float				GetTexRight()							{ return m_fTexRight; }
	float				GetTexTop()								{ return m_fTexTop; }
	float				GetTexBottom()							{ return m_fTexBottom; }
	BOOL				IsTexInvV()								{ return m_fTexBottom < m_fTexTop; }
	BOOL				IsTexInvH()								{ return m_fTexLeft < m_fTexRight; }
	BOOL				IsShow()								{ return m_bShow; }

protected:
	int					m_nPosX;
	int					m_nPosY;
	int					m_nWidth;
	int					m_nHeight;
	float				m_fTexLeft;
	float				m_fTexRight;
	float				m_fTexTop;
	float				m_fTexBottom;	
	BOOL				m_bShow;
};